
<?php
$form = $this->beginWidget('CActiveForm', array(
    "id" => "addEventForm",
    'enableAjaxValidation' => FALSE,
    'htmlOptions' => array('enctype' => 'multipart/form-data'),
        ));
?>
<legend>
    <h4><?php
        echo $control->getAjaxLink(array('name' => '功能列表', 'id' => 'showEventList'), array(
            'cooker' => 'BAEvent@showEventList'
        ));
        ?>>
        <?php
        $operationName = Blyn::app()->getActiveOperation()->getName();
        echo $control->getAjaxLink(array('name' => '应用管理', 'id' => 'showEventHome'), array(
            'cooker' => 'BAEvent@showEventHome'
        ));
        ?>>
        <?php
        echo $control->getAjaxLink(array('name' => '共享功能列表', 'id' => 'showEventShareList'));
        ?>>
        <?php echo '添加共享功能'; ?>
    </h4>
</legend>
<table class="table table-hover">
    <colgroup>
        <col class="span1">
        <col class="span7">
    </colgroup>
    <thead>
        <tr>
            <th><?php echo '属性'; ?></th>
            <th><?php echo '内容'; ?></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <?php echo '共享的操作'; ?>
            </td>
            <td>
                <?php
                echo $form->dropDownList($model, $operationIdField, $operationData, array('class' => 'span7', 'required' => true));
                ?>
                <!--                    &nbsp;&nbsp;&nbsp;&nbsp;<a id="CreateNewType_clink" role="button" data-toggle="modal" class="btn disabled" style="font-size: 12px;margin-top: -12px;">创建新类型</a>-->
            </td>
        </tr>
        <tr><td> <?php echo '共享的功能'; ?> </td>
            <td>
                <?php
                echo $form->dropDownList($model, $eventIdField, $eventData, array('class' => 'span7', 'required' => true));
                ?>
            </td>
        </tr>               
        <tr>
            <td> <?php echo '共享给机构'; ?>  </td>                    
            <td>
                <?php
                echo $form->dropDownList($model, $shareToSpaceField, $spaceRelationshipData, array('class' => 'span7', 'required' => true));
                ?>
        </tr>
    </tbody>
</table>
<p>
    <?php
    echo $control->getAjaxLink(array('id' => 'addEventShare', 'name' => '保存功能共享'), array(
        'eventShareId' => $eventShareId, 'htmlOptions' => array('class' => 'btn')
    ))
    ?>
</p>
<?php
$this->endWidget();
//echo CHtml::endForm();
?>